Hashing with Linear Probing and Frequency Ordering
نویسنده
چکیده
Linear probing of a scatte r (or hash) table interpre ts each key or item (these terms are inte rchangea ble here) as a probe index into the table [1]. 1 Typically, a key is divided by the table size and the remainder is used for indexing. If the selected slot is empty, the item is not present. Should the slot contain some other key, eacl1 next highe r location is checked until the item is found , an empty slot is discovered , or the whole table has been examined. (Indexes that exceed table sizes wrap around.) Table slots thus sea rched defin e a key's collis ion resolution sequence. Linear probing is generally not suitable for nearly filled tables, since as empty slots disappear, sea rches get very long. Nonetheless, linear probing can be improved by allowing for item frequ ency-of-reference.
منابع مشابه
Linear Probing with 5-wise Independence
Hashing with linear probing dates back to the 1950s, and is among the most studied algorithms for storing (key,value) pairs. In recent years it has become one of the most important hash table organizations since it uses the cache of modern computers very well. Unfortunately, previous analyses rely either on complicated and space consuming hash functions, or on the unrealistic assumption of free...
متن کاملA unified approach to linear probing hashing
We give a unified analysis of linear probing hashing with a general bucket size. We use both a combinatorial approach, giving exact formulas for generating functions, and a probabilistic approach, giving simple derivations of asymptotic results. Both approaches complement nicely, and give a good insight in the relation between linear probing and random walks. A key methodological contribution, ...
متن کاملString hashing for linear probing
Linear probing is one of the most popular implementations of dynamic hash tables storing all keys in a single array. When we get a key, we first hash it to a location. Next we probe consecutive locations until the key or an empty location is found. At STOC’07, Pagh et al. presented data sets where the standard implementation of 2-universal hashing leads to an expected number of Ω(log n) probes....
متن کاملTabulation Based 5-Universal Hashing and Linear Probing
Previously [SODA’04] we devised the fastest known algorithm for 4-universal hashing. The hashing was based on small pre-computed 4-universal tables. This led to a five-fold improvement in speed over direct methods based on degree 3 polynomials. In this paper, we show that if the pre-computed tables are made 5-universal, then the hash value becomes 5universal without any other change to the comp...
متن کاملDesign and Analysis of Hashing Algorithms with Cache Eeects
This paper investigates the performance of hashing algorithms by both an experimental and an analytical approach. We examine the performance of three classical hashing algorithms: chaining, double hashing and linear probing. Our experimental results show that, despite the theoretical superiority of chaining and double hashing, linear probing outperforms both for random lookups. We explore varia...
متن کامل